/* 
 * File:   Database.hpp
 * Author: bd
 *
 * Created on March 28, 2011, 2:18 PM
 */

#ifndef DATABASE_HPP
#define	DATABASE_HPP
#define SOCI_USE_BOOST
#include <soci/soci.h>

class Database {
public:
    Database(const std::string& connStr, bool connect_now = true);
    virtual ~Database();

    void connect();

    soci::session& session();
    std::string connStr() const;

protected:
    soci::session session_;
    std::string connStr_;
    bool connected_;
private:
    Database(const Database&);
    Database & operator=(const Database&);
};

#endif	/* DATABASE_HPP */

